<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%>
<%@page import="com.first.core.util.AppUtil"%>
<%@page import="com.first.core.util.ContextUtil"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String basePath=request.getContextPath();
%>
<%@page import="java.util.Enumeration"%>
<html>
<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="msthemecompatible" content="no">
		<title><%=AppUtil.getCompanyName()%></title>
				<link rel="stylesheet" type="text/css" href="<%=basePath%>/ext3/resources/css/ext-all-notheme.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/ext3/resources/css/ext-patch.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/ext3/ux/css/Portal.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/ext3/ux/css/Ext.ux.UploadDialog.css" />
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/admin.css"/>
		
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/ext3/ux/css/ux-all.css"/>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/ext3/ux/caltask/calendar.css" />
		<!-- load the extjs libary -->
		<script type="text/javascript" src="<%=basePath%>/js/dynamic.jsp"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/adapter/ext/ext-base.gzjs"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ext-all.gzjs"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/core/ScriptMgr.js"></script>
		
		<script type="text/javascript" src="<%=basePath%>/js/App.import.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/core/AppUtil.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/print/Printer-all.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/print/renderers/GridPanel.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/export/Exporter-all.js"></script>
		
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/Ext.ux.IconCombob.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/RowEditor.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/fckeditor/fckeditor.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/Fckeditor.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/XmlTreeLoader.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/FileUploadField.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/UploadDialog.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/CheckColumn.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/Portal.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/PortalColumn.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/Portlet.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/Toast.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/Ext.ux.grid.RowActions.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/TabCloseMenu.js"></script>
		
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/DateTimeField.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/GroupSummary.js"></script>
		<script type="text/javascript" src="<%=basePath%>/ext3/ux/RowExpander.js"></script>
	
		<script type="text/javascript" src="<%=basePath%>/js/core/SystemCalendar.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/core/TreeSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/core/date.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/core/ux/TreePanelEditor.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/core/ux/TreeXmlLoader.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/core/ux/WebOffice.js"></script>

		<script type="text/javascript" src="<%=basePath%>/js/selector/UserSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/selector/UserSubSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/selector/DepSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/selector/RoleSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/selector/GoodsSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/selector/CarSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/selector/CustomerSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/selector/OnlineUserSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/selector/BookSelector.js"></script>	
		<script type="text/javascript" src="<%=basePath%>/js/selector/ProjectSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/selector/ProviderSelector.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/selector/EquipmentSelector.js"></script>
		
		<script type="text/javascript" src="<%=basePath%>/js/info/MessageWin.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/info/MessageReplyWin.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/info/MessageDetail.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/flow/ProcessNextForm.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/system/FileAttachDetail.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/system/DiaryDetail.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/task/WorkPlanDetail.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/personal/DutyView.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/personal/DutyForm.js"></script>
        <script type="text/javascript" src="<%=basePath%>/js/sound/soundmanager2.js"></script>
        <script type="text/javascript" src="<%=basePath%>/js/search/SearchForm.js"></script>
        
    	<link href="<%=basePath%>/css/desktop.css" rel="stylesheet" type="text/css" />	
    	<script type="text/javascript" src="<%=basePath%>/js/ScrollText.js"></script>
    	<script type="text/javascript" src="<%=basePath%>/ext3/ext-basex.js"></script>
	</head>
	<script type="text/javascript">
	Ext.onReady(function() {
		var menuTreePanel = new Ext.tree.TreePanel({
			root : "q",
			title : '<span class="commoncss">功能菜单</span>',
			region : 'west',
			split : true,
			width : 220,
			minSize : 180,
			maxSize : 300,
			collapsible : true,
			autoScroll : true,
			animate : false
		});
		
		var formPanel = new Ext.FormPanel( {
			url : __ctxPath + "/system/saveBook.do",
			id : "BookForm",
		    width : 750,  
		    autoHeight : true,  
		    frame : true,  
		    layout : "form", // 整个大的表单是form布局  
		    labelWidth : 55,  
		    labelAlign : "center",  
		    region : 'center',
		    items:[{  
		        xtype:"panel",    
		        baseCls:"x-plain",  
		        layout:"column",  
		        items:[{  
		            columnWidth:.5,  
		            layout:"form",  
		            labelWidth:55,  
		            baseCls:"x-plain",      
		            //bodyStyle:"padding-top: 15px; padding-left:10px;",      
		            items:[ 
		               	{name : "book.id",id : "id",xtype : "hidden",value : this.id == null ? "" : this.id},
		                {name:"book.name",id:"name",fieldLabel:"姓名",xtype:"textfield",anchor : '90%'}, 
		                {name:"book.author",id:"author",fieldLabel:"作者",xtype:"textfield",anchor : '90%'},  
		                {name:"book.translator",id:"translator",fieldLabel:"译者",xtype:"textfield",anchor : '90%'},
		                {name:"book.publishing",id:"publishing",fieldLabel:"出版社",xtype:"textfield",anchor : '90%'},
		                {name:"book.publishingDateStr",id:"publishingDateStr",fieldLabel:"出版时间",xtype:"datefield",format:"Y-m-d",anchor : '90%'},
		                {name:"book.isbn",id:"isbn",fieldLabel:"图书编号",xtype:"textfield",anchor : '90%'},
		                {name:"book.price",id:"price",fieldLabel:"图书定价",xtype:"textfield",anchor : '90%'}
		            ]  
		        },{ 
		        	columnWidth:.5,  
		            layout:"form",      
		            labelWidth:5,      
		            baseCls:"x-plain",    
		            items:[{ xtype:"box", inputType:"image",width:160,height:140, fieldLabel:"书籍封面" }]      
		         }  
		      ]               
		   },{ xtype : "htmleditor",  
		        fieldLabel : "书籍简介",  
		        name:"book.bookSynopses",
		        id:"bookSynopses",
		        anchor : '100%'
		        
		   }]
		});
		var userGrantWindow = new Ext.Window({
			layout : 'border',
			width : document.body.clientWidth - 100,
			height : document.body.clientHeight - 50,
			resizable : true,
			draggable : true,
			closeAction : 'hide',
			title : '<span class="commoncss">UI元素人员授权</span>',
			iconCls : 'app_rightIcon',
			modal : true,
			collapsible : true,
			maximizable : true,
			animateTarget : document.body,
			// //如果使用autoLoad,建议不要使用动画效果
			buttonAlign : 'right',
			constrain : true,
			border : false,
			items : [menuTreePanel, formPanel],
			buttons : [{
						text : '关闭',
						iconCls : 'deleteIcon',
						handler : function() {
							userGrantWindow.hide();
						}
					}]
			});
			//userGrantWindow.show();
	})
	</script>
    <body>  
        <div id="west-div">  
            west  
        </div>  
        <div id='center-center'>  
        </div>  
    </body>  
</html>  